Merge "LoginSignupSpecialPage: Don't output empty 'uselang'"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 7 Nov 2016 20:29:10 +0000 (20:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 7 Nov 2016 20:29:10 +0000 (20:29 +0000)
includes/specialpage/LoginSignupSpecialPage.php

index 00c2416..d2da3ad 100644 (file)
@@ -156,7 +156,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                        [
                                'returnto' => $this->mReturnTo,
                                'returntoquery' => $this->mReturnToQuery,
-                               'uselang' => $this->mLanguage,
+                               'uselang' => $this->mLanguage ?: null,
                                'fromhttp' => $wgSecureLogin && $this->mFromHTTP ? '1' : null,
                        ]
                );
@@ -619,7 +619,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                $form = HTMLForm::factory( 'vform', $formDescriptor, $context );
 
                $form->addHiddenField( 'authAction', $this->authAction );
-               if ( $wgLoginLanguageSelector ) {
+               if ( $wgLoginLanguageSelector && $this->mLanguage ) {
                        $form->addHiddenField( 'uselang', $this->mLanguage );
                }
                $form->addHiddenField( 'force', $this->securityLevel );